]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
panel: Consider visibility changes for solid style
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 20 Jun 2017 08:16:05 +0000 (10:16 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 5 Jul 2017 14:49:32 +0000 (16:49 +0200)
We currently assume that window state changes are accompanied by an
allocation change (triggered for example by the minimize animation).
However this misses the case where a window actor is simply hidden
without any transition, as is the case with the 'show-desktop' action
for instance, so start tracking plain visibility changes as well.

https://bugzilla.gnome.org/show_bug.cgi?id=783975

js/ui/panel.js

index 83fda0ea848395cb201afed6889a994c759bdff0..52c89d79cd2ebe7ded3fa9014ba2edfcefb15e05 100644 (file)
@@ -823,12 +823,17 @@ const Panel = new Lang.Class({
     },
 
     _onWindowActorAdded: function(container, metaWindowActor) {
-        let signalId = metaWindowActor.connect('allocation-changed', Lang.bind(this, this._updateSolidStyle));
-        this._trackedWindows.set(metaWindowActor, signalId);
+        let signalIds = [];
+        ['allocation-changed', 'notify::visible'].forEach(s => {
+            signalIds.push(metaWindowActor.connect(s, Lang.bind(this, this._updateSolidStyle)));
+        });
+        this._trackedWindows.set(metaWindowActor, signalIds);
     },
 
     _onWindowActorRemoved: function(container, metaWindowActor) {
-        metaWindowActor.disconnect(this._trackedWindows.get(metaWindowActor));
+        this._trackedWindows.get(metaWindowActor).forEach(id => {
+            metaWindowActor.disconnect(id);
+        });
         this._trackedWindows.delete(metaWindowActor);
         this._updateSolidStyle();
     },